<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>排行榜</title>
	<link rel="stylesheet" href="/index/css/common.css?v=2">
	<link rel="stylesheet" href="/index/css/ranking.css">

	<style>
		.rankBox{
			display: none;
		}

		.show{
			display: block;
		}
		.rankInfor{margin-left:20px;}

		.ranks div{display: inline-block;width:30px;text-align: center}
	</style>
</head>
<body>
	<div class="tabsBox">
		<div class="topTab">
			<div class="tabLeft">
				<img src="/index/assets/left_J.png" >
			</div>
			<div class="tabCenters">排行榜</div>
			<!-- <div class="tabRight">收益说明</div> -->
		</div>
	</div>

	<div class="ranking">
		<div class="tabList">
			<div class="tabs" type="yesterday">昨日排行</div>
			<div class="tabs on" type="today">今日排行</div>
			<div class="tabs" type="total">总排行</div>
		</div>
		<div class="rankBox cleardrift yesterday">
			{if !empty($yesterday_tops[1])}
			<div class="rankDetail rank-down top3">
				<div class="ranks">
					<div class="rankNum" >2</div>
					<img src="{$yesterday_tops[1]['avatar']}" >
				</div>
				<div class="rankInfor">
					<div class="rankName">{$yesterday_tops[1]['nickname']}</div>
					<div class="rankTg">Lv:{:$yesterday_tops[1]['level']>0?$level[$yesterday_tops[1]['level']]:'普通用户'}</div>
				</div>
				<div class="rankPrice">¥ {$yesterday_tops[1]['money']}</div>
			</div>
			{/if}
			{if !empty($yesterday_tops[0])}

			<div class="rankDetail cleardrift top3">
				<div class="ranks">
					<div class="rankNum" style="background:#FFCC00">1</div>
					<img src="{$yesterday_tops[0]['avatar']}" >
				</div>
				<div class="rankInfor">
					<div class="rankName">{$yesterday_tops[0]['nickname']}</div>
					<div class="rankTg">Lv:{:$yesterday_tops[0]['level']>0?$level[$yesterday_tops[0]['level']]:'普通用户'}</div>
				</div>
				<div class="rankPrice">¥ {$yesterday_tops[0]['money']}</div>
			</div>
			{/if}
			{if !empty($yesterday_tops[2])}

			<div class="rankDetail cleardrift rank-down top3">
				<div class="ranks">
					<div class="rankNum">3</div>
					<img src="{$yesterday_tops[2]['avatar']}" >
				</div>
				<div class="rankInfor cle">
					<div class="rankName">{$yesterday_tops[2]['nickname']}</div>
					<div class="rankTg">Lv:{:$yesterday_tops[2]['level']>0?$level[$yesterday_tops[2]['level']]:'普通用户'}</div>
				</div>
				<div class="rankPrice">¥ {$yesterday_tops[2]['money']}</div>
			</div>
			{/if}

			{foreach $yesterday_tops as $k=>$v}
			{php} if($k<3) continue; {/php}
			<div class="rankDetail cleardrift">
				<div class="ranks">
					<div class="rankNum" >{$k+1}</div>
					<img src="{$v.avatar}" >
				</div>
				<div class="rankInfor">
					<div class="rankName">{$v.nickname}</div>
					<div class="rankTg">Lv:{:$v['level']>0?$level[$v['level']]:'普通用户'}</div>
				</div>
				<div class="rankPrice">¥ {$v.money}</div>
			</div>
			{/foreach}
		</div>
		<div class="rankBox cleardrift today show">
			{if !empty($today_tops[1])}
			<div class="rankDetail rank-down top3">
				<div class="ranks">
					<div class="rankNum" >2</div>
					<img src="{$today_tops[1]['avatar']}" >
				</div>
				<div class="rankInfor">
					<div class="rankName">{$today_tops[1]['nickname']}</div>
					<div class="rankTg">Lv:{:$today_tops[1]['level']>0?$level[$today_tops[1]['level']]:'普通用户'}</div>
				</div>
				<div class="rankPrice">¥ {$today_tops[1]['money']}</div>
			</div>
			{/if}
			{if !empty($today_tops[0])}

			<div class="rankDetail cleardrift top3">
				<div class="ranks">
					<div class="rankNum" style="background:#FFCC00">1</div>
					<img src="{$today_tops[0]['avatar']}" >
				</div>
				<div class="rankInfor">
					<div class="rankName">{$today_tops[0]['nickname']}</div>
					<div class="rankTg">Lv:{:$today_tops[0]['level']>0?$level[$today_tops[0]['level']]:'普通用户'}</div>
				</div>
				<div class="rankPrice">¥ {$today_tops[0]['money']}</div>
			</div>
			{/if}
			{if !empty($today_tops[2])}

			<div class="rankDetail cleardrift rank-down top3">
				<div class="ranks">
					<div class="rankNum">3</div>
					<img src="{$today_tops[2]['avatar']}" >
				</div>
				<div class="rankInfor cle">
					<div class="rankName">{$today_tops[2]['nickname']}</div>
					<div class="rankTg">Lv:{:$today_tops[2]['level']>0?$level[$today_tops[2]['level']]:'普通用户'}</div>
				</div>
				<div class="rankPrice">¥ {$today_tops[2]['money']}</div>
			</div>
			{/if}

			{foreach $today_tops as $k=>$v}
			{php} if($k<3) continue; {/php}
			<div class="rankDetail cleardrift">
				<div class="ranks">
					<div class="rankNum">{$k+1}</div>
					<img src="{$v.avatar}" >
				</div>
				<div class="rankInfor">
					<div class="rankName">{$v.nickname}</div>
					<div class="rankTg">Lv:{:$v['level']>0?$level[$v['level']]:'普通用户'}</div>
				</div>
				<div class="rankPrice">¥ {$v.money}</div>
			</div>
			{/foreach}
		</div>
		<div class="rankBox cleardrift total">
			{if !empty($total_tops[1])}
			<div class="rankDetail rank-down top3">
				<div class="ranks">
					<div class="rankNum" >2</div>
					<img src="{$total_tops[1]['avatar']}" >
				</div>
				<div class="rankInfor">
					<div class="rankName">{$total_tops[1]['nickname']}</div>
					<div class="rankTg">Lv:{:$total_tops[1]['level']>0?$level[$total_tops[1]['level']]:'普通用户'}</div>
				</div>
				<div class="rankPrice">¥ {$total_tops[1]['total_earnings']}</div>
			</div>
			{/if}
			{if !empty($total_tops[0])}

			<div class="rankDetail cleardrift top3">
				<div class="ranks">
					<div class="rankNum" style="background:#FFCC00">1</div>
					<img src="{$total_tops[0]['avatar']}" >
				</div>
				<div class="rankInfor">
					<div class="rankName">{$total_tops[0]['nickname']}</div>
					<div class="rankTg">Lv:{:$total_tops[0]['level']>0?$level[$total_tops[0]['level']]:'普通用户'}</div>
				</div>
				<div class="rankPrice">¥ {$total_tops[0]['total_earnings']}</div>
			</div>
			{/if}
			{if !empty($total_tops[2])}

			<div class="rankDetail cleardrift rank-down top3">
				<div class="ranks">
					<div class="rankNum">3</div>
					<img src="{$total_tops[2]['avatar']}" >
				</div>
				<div class="rankInfor cle">
					<div class="rankName">{$total_tops[2]['nickname']}</div>
					<div class="rankTg">Lv:{:$total_tops[2]['level']>0?$level[$total_tops[2]['level']]:'普通用户'}</div>
				</div>
				<div class="rankPrice">¥ {$total_tops[2]['total_earnings']}</div>
			</div>
			{/if}

			{foreach $total_tops as $k=>$v}
			{php} if($k<3) continue; {/php}
			<div class="rankDetail cleardrift">
				<div class="ranks">
					<div class="rankNum" style="">{$k+1}</div>
					<img src="{$v.avatar}" >
				</div>
				<div class="rankInfor">
					<div class="rankName">{$v.nickname}</div>
					<div class="rankTg">Lv:{:$v['level']>0?$level[$v['level']]:'普通用户'}</div>
				</div>
				<div class="rankPrice">¥ {$v.total_earnings}</div>
			</div>
			{/foreach}
		</div>

	</div>
	{include file='common/menu'}
</body>
<script type="text/javascript" src="/index/js/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="/index/js/common.js"></script>
<script>
	$(function(){
			$('.tabs').click(function(){
				var index = $(this).index();
				var type=$(this).attr('type');
				$('.rankBox').hide();
				$('.'+type).show();

				$(this).addClass("on").siblings().removeClass("on");
	//       		 $(".shouquanBox").eq(index).addClass("active").siblings().removeClass("active");
			})
		})
</script>
</html>